package com.sky.mapper;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 贾育权~
 * @version 1.0
 */
@SuppressWarnings({"all"})
@Mapper

public interface ShoppingCartMapper {//说明是mapper层的用来和数据库进行交互的 查询数据库啊 增删改查啊
    //注解就是帮住我们更好的是实现我们的功能代码看起来更加的简洁
    List<ShoppingCart> list(ShoppingCart shoppingCart);

    void updateNumberById(ShoppingCart cartServiceOne);

    void insert(ShoppingCart shoppingCart);

    @Delete("delete from shopping_cart where user_id = #{currentId}")
    void deleteByUserId(Long currentId);
    //@Delete("delete from shopping_cart where id=#{id}")
    @Delete("delete from shopping_cart where id=#{id}")//
    void deleteById(Long id);
//就是吧对应的数据封装到list 哪一个用户 菜品/套餐  口味道如何//接收一张图片
 //   void add(ShoppingCartDTO shoppingCartDTO);
}
